﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Constant;
using Pixysoft.Weblications.Sango.Formular;
using Pixysoft.Weblications.Sango.Environment;

namespace Pixysoft.Weblications.Sango.Command.officer
{
    partial class SangoOfficerHandler
    {
        public officer_upgradeextracooldowninfo officer_upgradeextracooldowninfo()
        {
            string userCode = SangoManager.Authentication();

            officer_upgradeextracooldowninfo response = ReflectionManager.CreatePojo<officer_upgradeextracooldowninfo>();
            response.Succeed = false;

            Entities.Usr_Queue queue = UsrQueueDao.getRunningQueue(userCode, CtiQueueTypecodeCollection.OFFICER_UPGRADE_EXTRA, userCode);

            if (queue == null)
            {
                response.Message = "无冷却队列";
                return response;
            }


            Entities.Sys_Queue sysqueue = SysQueueHelper.searchByCode(queue.Queueserialcode);

            response.goldprice = (QueueFormular.getQueueCooldownGoldPrice(queue, sysqueue));
            response.Succeed = true;
            return response;
        }


    }
    public interface officer_upgradeextracooldowninfo : ISangoResponse
    {
        long goldprice { get;set;}
    }
}
